{% extends 'base.html' %}

{% block meta %}
<meta name="author" content="{{ page.author.name }}" />
<meta name="description" content="{{ page.summary|striptags|escape }}" />
<meta name="keywords" content="{{ page.tags|join(', ')|escape }}">

{% if page.translations %}
<link rel="alternate" href="{{ SITEURL }}/{{ page.url }}" hreflang="{{ page.lang }}" />
{% for a in page.translations %}
<link rel="alternate" href="{{ SITEURL }}/{{ a.url }}" hreflang="{{ a.lang }}" />
{% endfor %}
{% endif %}

{% endblock %}

{% block title %}
{{ SITENAME|striptags }} - {{ page.title|striptags }}
{% endblock %}

{% block content %}
<article class="container-fluid">
  <header class="m-lg-4 m-md-3 m-2">
    <h1 class="py-2 text-center">{{ page.title }}</h1>
    <p class="m-0 text-center">{{ page.date.strftime('%Y-%m-%d') }}发布于{{ page.category.name }} | 最后更新于{{ page.modified.strftime('%Y-%m-%d %H:%m:%S') }}</p>
    <p>
      {% if page.tags %}
      {% for tag in page.tags %}
      <a class="badge text-bg-secondary text-decoration-none" href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
      {% endfor %}
      {% endif %}
    </p>
  </header>
  <div class="container">
    <main>
    {{ page.content }}
  </main>
  </div>

</article>
{% endblock %}